home *** CD-ROM | disk | FTP | other *** search
/ Champak 122 / Vol 122.iso / games / super_cr.swf / scripts / DefineSprite_380 / frame_252 / DoAction.as
Encoding:
Text File  |  2011-01-06  |  693 b   |  32 lines

  1. stop();
  2. delete ball.onEnterFrame;
  3. delete flame.onEnterFrame;
  4. ball._x = 800;
  5. ball._y = 130;
  6. flame._x = 814;
  7. flame._y = 130;
  8. ball.onEnterFrame = function()
  9. {
  10.    this._x -= 60;
  11.    flame._x = this._x + 14;
  12.    if(this._x <= pitcher._x)
  13.    {
  14.       this._x = pitcher._x;
  15.       flame._x = pitcher._x + 14;
  16.       pitcher.play();
  17.       pitcher.mark = pitcher._x;
  18.       pitcher.onEnterFrame = function()
  19.       {
  20.          pitcher._x -= 1;
  21.          flame._x -= 1;
  22.          ball._x -= 1;
  23.          if(pitcher._x < pitcher.mark - 10)
  24.          {
  25.             gotoAndStop("win");
  26.             delete pitcher.onEnterFrame;
  27.          }
  28.       };
  29.       delete this.onEnterFrame;
  30.    }
  31. };
  32.